1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing system, an image processing method and an image processing program, and particularly to an image processing system, an image processing method and an image processing program for compressing image data.
2. Description of the Related Art
Techniques for compressing image data have been known. A BTC (Block Truncation Coding) compression method is an example of such a technique.
Further, coding circuits for image data have been disclosed, e.g., in Japanese Laid-Open Patent Publication Nos. 4-189089, 4-189090 and 4-189091. According to Japanese Laid-Open Patent Publication Nos. 4-189089, 4-189090 and 4-189091, the encoding circuit for the image data transmits, as addition codes, a median of the picture element data and data of a half dynamic range from which high-order bits are removed, and thereby reduces the number of bits of the addition code to be transmitted.
Also, Japanese Laid-Open Patent Publication No. 3-214987 has disclosed a high-efficiency coding device that compresses a data quantity of addition data that occurs in block encoding. According to Japanese Laid-Open Patent Publication No. 3-214987, the high-efficiency coding device includes a blocking circuit blocking input digital image data, a block coding circuit coding image data in a block appropriately for the dynamic range of each block, a sensing circuit sensing a maximum value of the addition code of each block used in the block coding circuit over a predetermined number of blocks, a determining circuit determining the number of bits assigned to the addition codes for a period of a predetermined number of blocks based on an output of the sensing circuit, and a changing circuit changing the number of bits of the addition code based on the output of the determining circuit. The output of the block coding circuit, the addition code provided from the changing circuit and a bit number identifying code provided from the determining circuit are transmitted so that the data quantity of the addition code can be compressed.
Japanese Laid-Open Patent Publication No. 6-164411 has disclosed an adaptive dynamic range coding and encoding device. According to Japanese Laid-Open Patent Publication No. 6-164411, the device divides input signals into blocks, and performs adaptive quantization on signals in each block according to a dynamic range that represents a difference between maximum and minimum values of the signals in the block. Also, it can also decode the adaptively quantized information to obtain the original input signal.
Japanese Laid-Open Patent Publication No. 10-040364 has disclosed a color image producing method. According to Japanese Laid-Open Patent Publication No. 10-040364, an image processing apparatus prepares a box of a color space for representing a full-color image that is input through an image reading device, using initial representative colors of N in number, and puts each of the colors presenting the color image into the box. Colors other than the initial representative colors are prepared as a new box, and the boxes are merged so that the boxes may be always N in number and the boxes may have a minimum volume. The apparatus produces approximate image, using a centroid of the eventually formed boxes of N in number as a representative color, and provides it to an image output apparatus.
In the BTC compression, however, the colors in the block are classified into colors of n in number that is smaller than a number m of picture elements in the block, records color information (representative value) about n colors as well as information about a correlation between each picture element and color (representative values), and thereby the image is compressed. Therefore, it is necessary to determine a reference for color classification by scanning the whole data in the blocks. It is necessary to obtain the representative value from the classified picture element values. For implementing the color classifying processing in hardware according to a conventional technique, therefore, the whole image data in the blocks must be held in the hardware at least until the representative value of each group is calculated after the end of the color classifying processing. This decreases the image processing speed.
For holding the image data in the blocks, the image processing apparatus must include a line memory for holding, on a band-by-band basis, the image data containing blocks. However, the memory that can hold the image data on the band-by-band basis has a large capacity and thus is expensive. As the block size increases for improving a compressibility, the required size of the line memory increases.